(function(){
	var db = require("../db/index");
	var config = require("../_include/config");
	var skill = {
		show_info:function(){
			return this.info;
		},
		set_info:function(extend_info){
			var self = this;
			var info = self.info;
			for(var key in extend_info){
				if (extend_info.hasOwnProperty(key)) {
					info[key] = extend_info[key]
				}
			}
			db.update("ach",self._id,self);
		},
		lock:function(){
			self.readOnly = true;
			db.update(config.dbname.ach,self._id,self);
		},
		unlock:function(){
			self.readOnly = false;
			db.update(config.dbname.ach,self._id,self);
		},
		islock:function(){
			return self.readOnly;
		}
	}
	module.exports = skill;
})();
